<!--
 * @Descripttion: 新增销售订单
 * @version:
 * @Author: cxguo
 * @Date: 2019-08-17 20:26:23
 * @LastEditors: cxguo
 * @LastEditTime: 2020-11-11 19:50:29
 -->
<template>
  <div>
    <h3>{{ dataObj.name }}</h3>
    <el-divider class="margin-tb5" />
    <el-row>
      <el-col :span="6">
        开户银行：{{ dataObj.bankName }}
      </el-col>
      <el-col :span="6">
        账户余额：{{ remainder }}
      </el-col>
      <el-col :span="6">
        银行账号：{{ dataObj.account }}
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="6">
        备注：{{ dataObj.remarks }}
      </el-col>
      <el-col :span="6">
        期初余额：{{ dataObj.originAmount }}
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { oftenuse } from '@/libs/mixins'
import clonedeep from 'clonedeep'

export default {
  name: 'AccountTransDetailView',
  components: { },
  filters: {
  },
  mixins: [oftenuse],
  props: {
    data: {
      type: Object,
      default: () => { return {} }
    }
  },
  data() {
    return {
    }
  },
  computed: {
    remainder: function() {
      const row = this.dataObj
      const originAmount = row.originAmount || 0
      const changeAmount = row.changeAmount || 0
      const value = this.$amount(originAmount)
        .add(changeAmount).format()
      return value
    }
  },
  created() {
    this.dataObj = clonedeep(this.data) || {}
  },
  methods: {
  }
}
</script>
<style scoped>
.el-divider--horizontal{
  margin: 5px 0;
}
</style>>
